package net.azure.app.model;

import net.azure.app.Azure;

import java.util.HashMap;

/**
 * Created by IntelliJ IDEA.
 * User: Venkatraman Kandaswamy : kvenkatraman@gmail.com
 * Date: 15-Jul-2008
 * Time: 06:19:05
 */
public class AzureSession {
    private static Integer MSL;

    private static HashMap<Integer,Story> stories;
    private static HashMap<Integer,Story> defaultStories;
    private static Azure azure;

    public static void reset() {
        stories = defaultStories;
        getAzure().createUIComponents();
    }
    
    public static Story getCurrentStory() {
        return stories.get(MSL);
    }

    public static Integer[] getMsls() {
        return stories.keySet().toArray(new Integer[0]);
    }

    public static void setStories(HashMap<Integer, Story> stories) {
        AzureSession.stories = stories;
    }

    public static HashMap<Integer, Story> getDefaultStories() {
        return defaultStories;
    }

    public static void setDefaultStories(HashMap<Integer, Story> defaultStories) {
        AzureSession.defaultStories = defaultStories;
    }

    public static Integer getMSL() {
        return MSL;
    }

    public static void setMSL(Integer MSL) {
        AzureSession.MSL = MSL;
    }

    public static Azure getAzure() {
        return azure;
    }

    public static void setAzure(Azure azure) {
        AzureSession.azure = azure;
    }

    public static HashMap<Integer, Story> getStories() {
        return stories;
    }

    public static String[] getHeader() {
        return defaultStories.get(new Integer(1)).header().toArray(new String[0]);
    }
}
